-- GENERATED SPELL FOR [Sunblade Keeper] --


function spell0_24762(pUnit, Event) --@Banish,n/a--
pUnit:FullCastSpellOnTarget(44765,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24762', 10000, 1)
end

function spell1_24762(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15232,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24762', 3000, 1)
end

function spell2_24762(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(20741,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24762', 592, 1)
end

function Sorts_24762(pUnit, Event)
local choix_sorts_24762 = math.random(0, 2)
if choix_sorts_24762 == 0 then
pUnit:RegisterEvent('spell0_24762', 1, 1)
end
if choix_sorts_24762 == 1 then
pUnit:RegisterEvent('spell1_24762', 1, 1)
end
if choix_sorts_24762 == 2 then
pUnit:RegisterEvent('spell2_24762', 1, 1)
end
end

function mob24762_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24762', math.random(1500, 3000), 1)
end

function mob24762_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24762_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24762_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24762, 1, 'mob24762_Action')
RegisterUnitEvent(24762, 2, 'mob24762_Leave')
RegisterUnitEvent(24762, 3, 'mob24762_Kill')
RegisterUnitEvent(24762, 4, 'mob24762_Die')
